﻿@model DTcms.Model.BaseModel
@{
    ViewBag.Title = "我的订单-" + Model.site.name;
    string action = Model.info["action"].ToString();
    var m = (DTcms.Model.orders)Model.info["model"];
    string expressdetail = Model.info["expressdetail"].ToString();
}
@section HeaderContent{

}
<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="@Html.linkurl("index")">首页</a> &gt;
        <a href="@Html.linkurl("usercenter","index")">会员中心</a>
        <a href="@Html.linkurl("userorder","list")">订单管理</a>
    </div>
</div>
<!--/当前位置-->

<div class="section clearfix">
    <!--页面左边-->
    @Html.Partial("_ucenter_nav")
    <!--/页面左边-->
    <!--页面左边-->
    <div class="right-auto">
        <div class="bg-wrap" style="min-height:765px;">
            <div class="sub-tit">
                <a class="add" href="javascript:history.go(-1);"><i class="iconfont icon-reply"></i>返回</a>
                <ul>
                    <li class="selected">
                        <a href="javascript:;">查看订单</a>
                    </li>
                </ul>
            </div>
            @if (m.status < 4)
            {
                <!--订单进度-->
                <div class="order-progress @(m.payment_status>0?"mini":"")">
                    <ul>
                        <!--下单-->
                        <li class="first active">
                            <div class="progress">下单</div>
                            <div class="info">@m.add_time</div>
                        </li>
                        <!--/下单-->
                        @if (m.payment_status > 0)
                        {
                            <li class="@(m.payment_status==2?"active":"")">
                                <div class="progress">付款</div>
                                @if (m.payment_status == 2)
                                {
                                    <div class="info">@m.payment_time</div>
                                }
                            </li>
                            <!--/付款-->
                        }

                        <!--确认-->
                        <li class="@(m.status>=2?"active":"")">
                            <div class="progress">确认</div>
                            @if (m.status >= 2)
                            {
                                <div class="info">@m.confirm_time</div>
                            }
                        </li>
                        <!--/确认-->
                        <!--发货-->
                        <li class="@(m.express_status==2?"active":"")">
                            <div class="progress">发货</div>
                            @if (m.express_status == 2)
                            {
                                <div class="info">@m.express_time</div>
                            }
                        </li>
                        <!--/发货-->
                        <!--完成-->
                        <li class="last @(m.status>2?"active":"")">
                            <div class="progress">完成</div>
                            @if (m.status > 2)
                            {
                                <div class="info">@m.complete_time</div>
                            }
                        </li>
                        <!--/完成-->
                    </ul>
                </div>
                <!--/订单进度-->
            }

            <!--订单概述-->
            <div class="form-box accept-box">
                <dl class="head form-group">
                    <dd>
                        订单号：@m.order_no
                        @if (Html.get_order_payment_status(m.id))
                        {
                            <a class="btn-pay" href="@Html.linkurl("payment", "?action=confirm&order_no=" + m.order_no)">去付款</a>
                        }
                    </dd>
                </dl>
                <dl class="form-group">
                    <dt>订单状态：</dt>
                    <dd>
                        @Html.get_order_status(m.id)
                    </dd>
                </dl>
                @if (m.payment_status > 0)
                {
                    <dl class="form-group">
                        <dt>支付方式：</dt>
                        <dd>@Html.get_payment_title(m.payment_id)</dd>
                    </dl>
                }

                @if (m.express_status == 2)
                {
                    <dl class="form-group">
                        <dt>发货单号：</dt>
                        <dd>@Html.get_express_title(m.express_id) @m.express_no</dd>
                    </dl>
                    <dl class="form-group">
                        <dt>物流信息：</dt>
                        <dd>
                            @Html.Raw(expressdetail)
                        </dd>
                    </dl>
                }
            </div>
            <!--/订单概述-->
            <!--商品列表-->
            <div class="table-wrap">
                <table width="100%" border="0" cellspacing="0" cellpadding="5" class="ftable">
                    <tr>
                        <th align="left" colspan="2">商品信息</th>
                        <th width="10%">单价</td>
                        <th width="10%">积分</th>
                        <th width="10%">数量</th>
                        <th width="10%">金额</th>
                        <th width="10%">积分</th>
                    </tr>
                    @if (m.order_goods != null)
                    {
                        foreach (var modelt in m.order_goods)
                        {
                            <tr>
                                <td width="60">
                                    <a target="_blank" href="@Html.linkurl("goods_show",modelt.article_id)">
                                        <img src="@Html.get_article_img_url(modelt.channel_id, modelt.article_id)" class="img" />
                                    </a>
                                </td>
                                <td align="left">
                                    <a target="_blank" href="@Html.linkurl("goods_show",modelt.article_id)">@modelt.goods_title</a>
                                    <p>@modelt.spec_text</p>
                                </td>
                                <td align="center">
                                    <s>￥@modelt.goods_price</s>
                                    <p>￥@modelt.real_price</p>
                                </td>
                                <td align="center">
                                    @(modelt.point > 0 ? "+" : "")
                                    @modelt.point
                                </td>
                                <td align="center">@modelt.quantity</td>
                                <td align="center">￥@(modelt.real_price * modelt.quantity)</td>
                                <td align="center">@(modelt.point * modelt.quantity)</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="7" align="center">暂无记录</td>
                        </tr>
                    }
                    <tr>
                        <td colspan="7" align="right">
                            <p>商品金额：<b class="red">￥@m.real_amount</b>&nbsp;&nbsp;+&nbsp;&nbsp;运费：<b class="red">￥@m.express_fee</b>&nbsp;&nbsp;+ &nbsp;&nbsp;支付手续费：<b class="red">￥@m.payment_fee</b>&nbsp;&nbsp;税费：<b class="red">@m.invoice_taxes</b></p>
                            <p style="font-size:22px;">应付总金额：<b class="red">￥@m.order_amount</b></p>
                        </td>
                    </tr>
                </table>
            </div>
            <!--/商品列表-->
            <!--收货信息-->
            <div class="form-box accept-box">
                <dl class="head form-group">
                    <dd>收货信息</dd>
                </dl>
                <dl class="form-group">
                    <dt>顾客姓名：</dt>
                    <dd>@m.accept_name</dd>
                </dl>
                <dl class="form-group">
                    <dt>送货地址：</dt>
                    <dd>@m.area @m.address @m.post_code</dd>
                </dl>
                <dl class="form-group">
                    <dt>联系电话：</dt>
                    <dd>@m.mobile @m.telphone</dd>
                </dl>
                <dl class="form-group">
                    <dt>电子邮箱：</dt>
                    <dd>@m.email</dd>
                </dl>
                <dl class="form-group">
                    <dt>备注留言：</dt>
                    <dd>@m.message</dd>
                </dl>
                <dl class="form-group">
                    <dt>开具发票：</dt>
                    <dd>
                        @(m.is_invoice == 1 ? "是" : "否")
                    </dd>
                </dl>
                @if (m.is_invoice == 1)
                {
                    <dl class="form-group">
                        <dt>发票抬头：</dt>
                        <dd>
                            @m.invoice_title
                        </dd>
                    </dl>
                }
            </div>
            <!--/收货信息-->

        </div>
    </div>
    <!--/页面左边-->
</div>
@section Scripts{

}